home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ Control Panel Hide 3.xpl < prev    next >
Text File  |  1999-08-24  |  3KB  |  114 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 3.1"
  2. "TYPE"="6"
  3. "COUNT"="5"
  4. "UIPATH"="Appearance\Control Panel\General Icons"
  5. "NAME"="Visible Items #3"
  6. "VERSION"="1.12"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Display "Regional Options" applet"
  9. "TEXT 2"="Display "Email" applet"
  10. "TEXT 3"="Display "ODBC" applet"
  11. "TEXT 4"="Display "Power Management" applet"
  12. "TEXT 5"="Display "Mouse Control" applet"
  13. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  14. "AUTHOR"="Xteq Systems"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@gmx.net."
  17. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  18. "COMMENT 3"="See also: MS KB Q207750"
  19.  
  20.  
  21. '******************************************************************
  22. '***                COPY !!!! ONLY EDIT LINES BELOW!!!!        ****
  23. '******************************************************************
  24. sVals=""
  25. sVals2=Array("intl.cpl","mlcfg32.cpl","odbccp32.cpl","powercfg.cpl","main.cpl") 
  26. sVals3=Array("intl.cpl","mlcfg32.cpl","odbccp32.cpl","powercfg.cpl","main.cpl") 
  27. '******************************************************************
  28. '*** Keep an eye on the order (must be the same as "TEXT x") ! ****
  29. '******************************************************************
  30. sPath="HKCU\Control Panel\Don't Load\"
  31. sFile="CONTROL.INI"
  32. sFileSec="Don't Load"
  33.  
  34.  
  35.  
  36. SUB Plugin_Initialize
  37.  if GetWinVer=4 then
  38.     sVals=sVals3
  39.  else
  40.     sVals=sVals2
  41.  end if
  42.  
  43.  for i=0 to UBound(sVals)
  44.      Call ReadIt(i+1,sVals(i)) 
  45.  next 
  46. END SUB
  47.  
  48. Sub ReadIt(ITM,VAL)
  49.   If GetWinVer=2 or GetWinVer=4 then
  50.  
  51.      s=RegReadValue(sPath & VAL)
  52.      if IsEmpty(s)=true then
  53.         Call SetUIElement(ITM,true)
  54.      else
  55.         Call SetUIElement(ITM,false)
  56.      end if
  57.  
  58.   else
  59.  
  60.     s=IniReadValue(sFile,sFileSec,VAL)
  61.     if len(s)>0 then
  62.        Call SetUIElement(ITM,false)
  63.     else
  64.        Call SetUIElement(ITM,true)
  65.     end if
  66.      
  67.   end if
  68.      
  69. End Sub
  70.  
  71. 'Called when the Plugin should validate the Data the user has entered
  72. SUB Plugin_CheckData(ElementIndex)
  73. END SUB
  74.  
  75. 'Called when the Plugin should apply the changes
  76. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  77.  for i=0 to UBound(sVals)
  78.      Call WriteIt(i+1,sVals(i)) 
  79.  next 
  80. END SUB
  81.  
  82. Sub WriteIt(ITM,VAL)
  83.  b=GetUIElement(ITM)
  84.  if b=true then
  85.     'Display it
  86.  
  87.     if GetWinVer=2 or GetWinVer=4 then  
  88.        s=RegReadValue(sPath & VAL)
  89.        if IsEmpty(s)=false then
  90.           Call RegDeleteValue(sPath & VAL)
  91.        end if
  92.     else
  93.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  94.     end if
  95.  
  96.  else
  97.    'Hide it
  98.    
  99.    if GetWinVer=2 or GetWinVer=4 then
  100.       Call RegWriteValue(sPath & VAL,"1",1) 
  101.    else
  102.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  103.    end if
  104.  
  105.  end if   
  106. End Sub
  107.  
  108.  
  109. 'Called when the Plugin is about to be removed from memory
  110. SUB Plugin_Terminate
  111. END SUB
  112.  
  113.  
  114.